using System;
using System.Security.Cryptography;

internal sealed class Class_h : IClass_d
{
	private SHA512CryptoServiceProvider m_b;

	private bool m_c;

	private ArraySegment<byte> d;

	private void a(byte[] A_0, int A_1, int A_2)
	{
		b(A_0, A_1, A_2);
	}

	void IClass_d.b(byte[] A_0, int A_1, int A_2)
	{
		//ILSpy generated this explicit interface implementation from .override directive in a
		this.a(A_0, A_1, A_2);
	}

	private void b()
	{
		c();
	}

	void IClass_d.b()
	{
		//ILSpy generated this explicit interface implementation from .override directive in b
		this.b();
	}

	private int a(byte[] A_0, int A_1)
	{
		return b(A_0, A_1);
	}

	int IClass_d.b(byte[] A_0, int A_1)
	{
		//ILSpy generated this explicit interface implementation from .override directive in a
		return this.a(A_0, A_1);
	}

	private void a(byte[] A_0, int A_1, int A_2, byte[] A_3, int A_4, ref byte[] A_5)
	{
		b(A_0, A_1, A_2, A_3, A_4, ref A_5);
	}

	void IClass_d.b(byte[] A_0, int A_1, int A_2, byte[] A_3, int A_4, ref byte[] A_5)
	{
		//ILSpy generated this explicit interface implementation from .override directive in a
		this.a(A_0, A_1, A_2, A_3, A_4, ref A_5);
	}

	internal Class_h()
	{
		this.m_b = new SHA512CryptoServiceProvider();
		c();
	}

	public int a()
	{
		return this.m_b.HashSize / 8;
	}

	private void a(byte A_0)
	{
		byte[] inputBuffer = new byte[1]
		{
			A_0
		};
		this.m_b.TransformBlock(inputBuffer, 0, 1, null, 0);
	}

	internal void b(byte[] A_0, int A_1, int A_2)
	{
		if (this.m_c)
		{
			this.m_b.TransformBlock(d.Array, d.Offset, d.Count, null, 0);
		}
		d = new ArraySegment<byte>(A_0, A_1, A_2);
		this.m_c = true;
	}

	internal void c()
	{
	}

	internal int b(byte[] A_0, int A_1)
	{
		if (this.m_c)
		{
			this.m_b.TransformFinalBlock(d.Array, d.Offset, d.Count);
		}
		Buffer.BlockCopy(this.m_b.Hash, 0, A_0, A_1, a());
		return a();
	}

	internal void b(byte[] A_0, int A_1, int A_2, byte[] A_3, int A_4, ref byte[] A_5)
	{
		byte[] array = new byte[A_2 + A_4];
		Buffer.BlockCopy(A_0, A_1, array, 0, A_2);
		Buffer.BlockCopy(A_3, 0, array, A_2, A_4);
		A_5 = this.m_b.ComputeHash(array);
	}
}
